80156: Function test xff.has-fallback-value

Documentation

Tests of xff.has-fallback-value($variable as xs:QName) as xs:boolean The xff.has-fallback-value function can only usefully be applied to bound variables in a precondition, consistency assertion, formula, and message processing. Because the function testcase does not have any way to set up and execute variable sets, it cannot test this function with a factVariable. There is a formula test case provided in this directory for that purpose, and it is listed as a testcase in the trunk/index.xml testcases file, to cause its execution.

Owners

Name Affiliation Email Start End
Herm Fischer Mark V Systems (Formerly UBmatrix) fischer@markv.com 08-07-2011 at 22:00:00

References

http://xbrl.org/Specification/variables/REC-2009-06-22/variables-REC-2009-06-22+corrected-errata-2011-03-16.html#term-fallback-value

Test Case Variations


V-01 Function raises an exception when not used in a precondition, message, consistency/value assertion or formula result or aspect rule expression.

Documentation

Inputs

  • instance: nihil.xml (DTS Discovery starting point) (ID=V01)
  • Function Call: for $foo in ('abc') return xff:has-fallback-value( QName('','foo' ) )

    (against file V01)

Outputs

  • Error code: xffe:invalidFunctionUse

V-02 Argument is not a QName

Documentation

XPath-defined error for type of argument.

Inputs

  • instance: nihil.xml (DTS Discovery starting point) (ID=V02)
  • Function Call: xff:has-fallback-value( 'hello I am not a QName' )

    (against file V02)

Outputs

  • Error code: xqt-err:XPTY0004

Revisions

Name On Details
Herm Fischer 08-07-2011 at 22:00:00 Created the test case.